<?php
// 自动加载类

namespace Sunsun\dal;

use Workerman\MySQL;

define("SUNSUN_WORKER_HOST","182.92.230.87");
define("SUNSUN_WORKER_PORT","3306");
define("SUNSUN_WORKER_USER","itboye_hbd");
define("SUNSUN_WORKER_PASSWORD","poiuyTREWQ123456");
define("SUNSUN_WORKER_DB_NAME","sunsun_xiaoyi");

/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2017-03-10
 * Time: 12:16
 */
class BaseDal
{
    public static  $db;
    public function __construct(){
        if(!($db instanceof  MySQL\Connection)){
            $db = new \Workerman\MySQL\Connection(SUNSUN_WORKER_HOST, SUNSUN_WORKER_PORT, SUNSUN_WORKER_USER, SUNSUN_WORKER_PASSWORD, SUNSUN_WORKER_DB_NAME);
        }
    }
}